﻿<Window x:Class="DbDoc.PowerDoc.Views.Login"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:DbDoc.PowerDoc.ViewModel"
        Title="Login to PowerDoc" Height="200" Width="300" ResizeMode="NoResize" Icon="/PowerDoc;component/dbdoc.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="150*" />
            <ColumnDefinition Width="15" />
        </Grid.ColumnDefinitions>
        <TextBlock Text="  Login" Grid.Column="0" Grid.Row="0" Style="{StaticResource HeaderText2}" Grid.ColumnSpan="3">
        </TextBlock>
        <Label Grid.Row="1" Grid.ColumnSpan="2" Foreground="Red" FontSize="12" Content="{Binding Message}"/>
        <Label Grid.Row="2"  HorizontalAlignment="Right">Username:</Label>
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Username, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" TabIndex="1"></TextBox>
        <Label Grid.Row="3"  HorizontalAlignment="Right" >Password:</Label>
        <PasswordBox Grid.Row="3" Grid.Column="1"   vm:PasswordHelper.Attach="True" vm:PasswordHelper.Password="{Binding Password, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"></PasswordBox>
        
        <Button Grid.Row="4" Grid.Column="1" Command="{Binding LoginCommand}" IsDefault="True">Login</Button>
    </Grid>
</Window>
